{include file=member.header.html}
<script type="text/javascript">
function DropDdata(id)
{
	if(confirm('{$lang.drop_confirm}') == true)
	{
		var url = REAL_SITE_URL+"/index.php?app=my_coupon&act=drop";
		$.getJSON(url,{id:id},function(data){
			if(data == true){
				msg("{$lang.handle_ok}");
				setTimeout(function(){
					window.location.href=REAL_SITE_URL+"/index.php?app=my_coupon";
				},1500);
			} 
		},"json");
	}
}
</script>
<div id="page-my-coupon" class="mb10">
	<div class="page-body my-coupon">
		<div class="record-coupon clearfix">
			<a href="mobile/index.php?app=my_coupon&act=bind" class="float-right btn">{$lang.bind}</a>
		</div>
		<!-- {foreach from=$coupons item=coupon name=v} -->
		<dl style="margin-bottom:15px;" class="inclusive-box f66">
			<dd><label>{$lang.coupon_sn} :</label><span>  {$coupon.coupon_sn}</span></dd>
			<dd><label>{$lang.payment_name} :</label><span> <!--{if $coupon.coupon_value}-->{$coupon.coupon_value}<!--{else}-->{$lang.no_limit}<!--{/if}--></span></dd>
			<dd><label>{$lang.limit_time} :</label><span>  {$coupon.start_time|date} {$lang.to} <!--{if $coupon.end_time}-->{$coupon.end_time|date}<!--{else}-->{$lang.no_limit}<!--{/if}--></span></dd>
			<dd><label>{$lang.min_amount} :</label><span> <!--{if $coupon.min_amount}-->{sprintf lang=min_amount_desc var1=coupon.min_amount}<!--{else}-->{$lang.no_limit}<!--{/if}--></span></dd>
            <dd><label>{$lang.store_name} :</label><span> <a href="{url index.php?app=store&id=$coupon.store_id}">{$coupon.store_name}</a></span></dd>
            <dd><label>{$lang.remain_times} :</label><span>  <!--{if $coupon.remain_times eq -1}-->{$lang.no_limit}<!--{else}-->{$coupon.remain_times}<!--{/if}--></span></dd>
			<dd><label>{$lang.if_valid} :</label><span>  <!--{if $coupon.valid}--><img src="{res file=images}/usable.gif" /><!--{else}--><img src="{res file=images}/unusable.gif" /><!--{/if}--></span></dd>
		</dl> 
		<div class="btn-box">
			<a href="javascript:;" onclick="DropDdata('{$coupon.coupon_sn}');" class="btn1" >{$lang.drop}</a>
		</div>   
		<!-- {foreachelse} -->
        <div class="no-record">{$lang.no_records}</div>
        <!--{/foreach}-->
	</div>
    <!--{if $coupons}-->
    {include file=page.bottom.html}
    <!--{/if}-->
</div>
{include file=footer.html}